From: Florian Müllner Date: Fri, 3 Jul 2015 20:11:24 +0000 (+0200) Subject: windowManager: Handle missing overrides settings X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1312 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dfc4cc4aafd1ca3dd52573418ca1303a2dcb8cf0;p=gnome-shell.git windowManager: Handle missing overrides settings shell_global_get_overrides_settings() may return %NULL in case of custom shell modes (i.e. not the default and classic ones); while this is not officially encouraged, we should still handle it rather than throw an error. https://bugzilla.gnome.org/show_bug.cgi?id=751921 --- diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 5a86d5ab3..e37372317 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -217,7 +217,8 @@ const WorkspaceTracker = new Lang.Class({ _getWorkspaceSettings: function() { let settings = global.get_overrides_settings(); - if (settings.settings_schema.list_keys().indexOf('dynamic-workspaces') > -1) + if (settings && + settings.settings_schema.list_keys().indexOf('dynamic-workspaces') > -1) return settings; return new Gio.Settings({ schema_id: 'org.gnome.mutter' }); },